<template>
  <div>
      <p class="header-top">
          <span class="icon-left" @click="back"><van-icon name="arrow-left" /></span>
          <span class="context-center">专栏详情</span>
          <span>    </span>
      </p>
       <div class="wzbody">
          <p class="title" v-html="wzdeta.title"></p>
          <img :src="wzdeta.pic" width="100%"/>
          <p v-html="wzdeta.content"></p>

      </div> 
  </div>
</template>
<script>
export default {
    data(){
        return{
            wzdeta:[]
        }
    },
    mounted(){
        let id=this.$route.query.id
        this.$network
      .getXq({
         params:{
             id:id
         }
      })
      .then(res => {
        //检测
        console.log(res.data.data);
        //赋值
        this.wzdeta = res.data.data;
        console.log(this.wzdeta)
      })
      .catch(error => {
        console.log(error);
      });
    },
    methods: {
        back(){
            window.history.back()
        }
    },
}
</script>


<style>
    .header-top{
    width: 100%;
    height: 0.8rem;
    display: flex;
    justify-content: space-between;
}
.icon-left{
    margin-left: 0.2rem;
    font-size: 0.4rem !important;
}
.context-center{
    font-size: 0.35rem !important;
}

.title{
    text-align: center;
    font-size: 0.5rem;
    padding-bottom: 0.4rem;
}
.wzbody img{
    padding: 0.2rem;
    box-sizing: border-box;
}
</style>